<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc><{$smarty.const.XOOPS_URL}>/</loc>
<lastmod><{$lastmod}></lastmod>
<priority>1.0</priority>
</url>

<{foreach name=i item=module from=$sitemap.modules}>


  <{if $module.name}>
    <url>
      <loc><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}>/</loc>
      <{if $module.lastmod}><lastmod><{$module.lastmod}></lastmod><{/if}>
    </url>

    <{foreach item=parent from=$module.parent}>
      <url>
        <loc><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}>/<{$parent.url}></loc>
        <{if $parent.lastmod}><lastmod><{$parent.lastmod}></lastmod><{/if}>
      </url>
      
      <{if $show_subcategoris}>
      <{foreach item=child from=$parent.child}>
        <url>
          <loc><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}>/<{$child.url}></loc>
          <{if $child.lastmod}><lastmod><{$child.lastmod}></lastmod><{/if}>
        </url>
      <{/foreach}>
      <{/if}>

    <{/foreach}>
    <{foreach item=sublink from=$module.sublinks}>
      <url>
        <loc><{$sublink.url}></loc>
        <{if $sublink.lastmod}><lastmod><{$sublink.lastmod}></lastmod><{/if}>
      </url>
    <{/foreach}>
  <{/if}>

<{/foreach}>

</urlset>
